package logic

import (
	"context"
	"user_srv/internal/dao"
	"user_srv/internal/svc"
	"user_srv/user"

	"github.com/zeromicro/go-zero/core/logx"
)

type MembershipLevelDelLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewMembershipLevelDelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *MembershipLevelDelLogic {
	return &MembershipLevelDelLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

// 会员等级删除
func (l *MembershipLevelDelLogic) MembershipLevelDel(in *user.MembershipLevelDelRequest) (*user.MembershipLevelDelResponse, error) {
	dao.MembershipLevelDel(int32(in.Id))
	return &user.MembershipLevelDelResponse{
		Msg: "会员等级删除成功",
	}, nil
}
